fix revert, test it

#368