Reverted this change as it tries to open a closed cursor causing a crash