fix profile building bug