fixed an issue when new connection wasn't created (fixes #14)