Attempt to fix precision bugs