change was_connected in factory