fix the character to int error