restoring order, if necessary