Cleanup #501.  I was using the replace string for calculations even
though the replace string is ignored when using 'n' flag.