Move cleaner out of connect event