Fix upgrade from earlier versions

Refines earlier changes for #51 to address issue when upgrading from pre-3.2 versions