Right test cases; Bug fix for ctoi and itoc