corrected where-params of migration
order search results - resolves #468