qs speed optimization

dependent on the last patch