Fix compatibility for sf2.2.*