fix qset out of index bug