Fix errors in building.