fixed a boundary issue