performance fixes in QuadCommand
Merge pull request #6102 from ricardoquesada/quadcommand_perf_fixes

performance fixes in QuadCommand