sf 2.2 deprecation fixes