Fix a bug when choosing a tag on deployment cause an error.