better handle cursors, when we get errors