Fix error in downgrade script