fixing string to integer error