Fix build script not working in specific case.