fix some compile problems