fixed error on restore_connection