fixed bug in json and itoa