Fix password prompt triggering twice when replacing another connection