close window on second call