fix outofboundsexception