BUG: boundary conditions