[#706] make substr index from correct character
Merge branch '706-fix-data-migration'