api: fix on query, now order results again