Allow closing frame after MAD-X has crashed

Fix #58.
Merge branch 'fix-close-after-madx-crash'