fixed cursors for composite queries