Moved the creation of the cursor in add_result.