fixed exceptions during shutdown
closes #208 - Zoom breaks the layout