CURSOR BUG FIX LAST TRY