update the clear modifications code