fix some compile bugs