Bugfix for invalid messages after a connection is dead