solve exit command problem