Cleanup. needed delay for some functions