Fixed bug, when not specifying a limit

When you don't specify a limit you get a wrong query.
Merge pull request #6 from thvd/patch-1

Fixed bug, when not specifying a limit