Fix #495 and cannot view repository by tag