diff --git a/artifact/src/sim/main.cpp b/artifact/src/sim/main.cpp
index 421278481f0a4132b1c0301d80d8d7937eb3158a..b0f1785c2a6aa9b59937ed2d55e2be65a32c6e40 100644
--- a/artifact/src/sim/main.cpp
+++ b/artifact/src/sim/main.cpp
@@ -389,7 +389,7 @@ void compute_responsetimes() {
// two pending jobs of the same task are allowed at the same time
if (pending_jobs.size() > 1)
if (pending_jobs.at(0).task_id == pending_jobs.at(1).task_id)
- std::sort(pending_jobs.begin(), pending_jobs.begin() + 1,
+ std::sort(pending_jobs.begin(), pending_jobs.end(),
[](const job &a, const job &b) {
return a.act_instant < b.act_instant; });