Trying to fix boundary conditions