Fixed autoquit issue