Fixing issue with wrong precision being used