Modified class to allow further 2.x backward compatibility