Fix deadlines ordering