fix of boundary conditions