Fix broken open-in-new-tab behavior