Corrected out of bounds exception