fix endbuild