fixes reconnect bug

see #148