Fix errors caused by revert