out of bound fix