fix some build problems