Hopefully fix remaining problems caused by floating point rounding errors

Authored by hetzenecker on Aug 23 2017, 12:13 AM.