Added a check for redundant Q's in the QMap