reset mode cleanly