fix external model bug