Fix some build errors