close window properly

I will also update README for `general.close_last_tab` once this gets merged.