Simplified, fixes warning message for undefined numbers