Completed the correction on collecting discrete variable list.