perf: Fix task context scheduling