Fixed destroy connection. It was called to early.