Cleanup connect_command