Changed realization of entries sorting. Needs QA =)