finally fixed area queries, added sorting for machine result tables