Fix some build bugs.