Fix apply modify fix (with test).