out of bounds error fixed