Sort activity items after compiling them