[Building] Fix thousands of bugs due to careless mistakes.