Remove  double underlining and incorrect transitions