fix boundserror