fix some compile issues