Fixes Cursor.each logging and added test.