fixed bug in initQvalues