I have not tracked down in detail where all these changes originate, this commit just gets things back to working again.
When a number is not a nubmer, don't just crash, exit properly with an error code. See attached testcase for an example.