fixed type reset on set of value with different type, issue #2877