fixed bugs, added more lines in getMaxQAction
small commit