fixed multi-quit bug