order specs by id and avoid missing spec group error