Avoid floating point issues