When the red flag was displayed they did not resume counting laps until they displayed the green flag. Everybody loses at least one lap on a pit stop but since they were not count laps the two cars that pitted did not lose any laps. So to try to make it fair they were sent to the tail.