Bug fix in numberToArray