Fixed quit-bug (Issue #2)