fix bounds bug