better check for numeric values; fixes #2