Fix for checkout branch issue for tags as well