Fix open in new tab bug