fixing error for nil country code