Fixing string to int comparrison error