Fix quit when all windows closed
Fix quit when all windows closed

- Closes #3656

nteract/nteract,nteract/nteract,nteract/nteract,nteract/nteract,nteract/composition,nteract/composition,nteract/composition,nteract/nteract