[BISERVER-8420, BISERVER-8405] fixed issues with Connection objects
being passed over the wire, also fixed null pointer issue.