fix a few build problems