[BUGFIX] Fix timetracker and pre-process middleware sequence