Fixed some building errors