fixed bug that would break some connections after initial connection