fix some init errors