bug for the boundary