Fixed quit-bug