update hook to handle tag refs