Added check to make sure it only works on internal links