fix a bug in qndmodel