Fix model set and call stack order bug