Babies with congenital heart disease have altered brain activity in regions involved in movement and emotions, but heart surgery restored these brain networks to healthy connectivity.