Fixed some problems in building.