Added compatibility from sf >= 2.2.*