Modify state remove function bug.