Autoclose problem (fixes Issue #12)