fix patch and build error