fix build errors for build source