Fix tests for cleanup tasks