Fix a few build errors