Moved country linking code to github from svn and fixed NPE bug POR-1729