Fixed a bug occurring when proxy model was used