Small bugfixes in .js code
Fix bug in #reconnect() when disconnected.