Small optimisation and small bugfix in on_numeric