properly support negative nums in convert