fixed criteria order generating database query
Merge pull request #18 from podolinek/master

fixed criteria order generating database query