Fix cursor API

Impossible to use DUPSORT features if value argument is omitted
Merge pull request #25 from hyc/cursors

Fix cursor API