Improve compatibility when set model