Fixed some build bugs.