Fix error while reverting