fixing upgrade from 3.1 / 3.0 / 3.2