Fix issues with creating popup links