Fixed a bug with logging of cursor.update and added tests.