cleanups for automatic running