Fix call to unblessed reference at disconnect when direct import to pg is not used. Thanks to Christian Bjornbak for the report.