fixed the sinking bug