fix string to int bug