[3.8] fix migration from 3.1

Fix the step31 migration