Fix a few build issues