Fix conversion of floats to booleans (fix #307)