fix bug of cast string to integer