Fix errors because of the 2.5.0 upgrade