Bug fix.  Substitute was not behaving correctly when autoformat is disabled