Fixed a number of minor compilation bugs.