fixing string compare problem