set default mode, cleanup