Fixed popup blocker bug. Closes #1.