allow % to be passed to the unit function. Fixes #1550 and fixes #1571