slightly different using, seems to fix bug 82. Also, rebuild connection when broken