Don't deref the cursor before transact!