some clean up for mode pre-startup