Fix bugs with commit and tags.