Fixed statistics queries. Modifed statistics page.