Out of bounds fix