Fixed client ref/unref to use correct conn.