issue #1 sort_paging used templates, some another minor fixes