fix some building errors