fix build routine.