fix some 3.4 upgrade errors