Made some changes in country detector