Fix entry sorting