quits properly