fixed a bug for float