Fix legend when revert called