Correcting a bug with hitbox and velocity calculation