out of bounds fixes