Not working so fine. Problems with query and historyview.