added another query test and fixed a bug with Cursor.