Fix country bug, little code refactoring and mistype fix