Fixed to issue #325
 handling connectWith options correctly