Removed out of bounds bug