fixed issue with conditions which prevented client reconnection