use correct close option to exit after last window closed