solve the error of reverting