proposed solution to #1550: fix unit() percentage

This is the same pull request as #1566. I moved the changes from my master branch to Percent_As_Unit_Parameter branch. However, that closed my last pull request