fixed sinking and end bouncing problem