Fixed a null reference error that occured when a private chat was closed but not removed from the list of opened windows.