invalid boundary conditions code fixed (broken recently)