fixed some build bugs