little performance improvement in quad command
Merge pull request #5576 from ricardoquesada/perf_improvement_in_quad_command

little performance improvement in quad command