Fixed a bug on lib/Connection