Fixed a bug with previous disconnect patch.