fix out of bound