Try to fix floating point errors