fixed the bug for floating