The previous code didn't handle negative numbers either.