imsm: fix family number handling