Remove ext and fix upgrade error in beforedrop