Attempted open cursor fix