fixes to ensure no api changes between 2.7 and 3.x