Fixing code to convert decimals into whole numbers