Fix passing connection objects