fix a few build issues