Fix some build issues