Fix bounds bug