work out defects of user types and user id migration