Fixed some build problems