Lewis Hamilton was quickest in Q1 and Q2 but only qualified third after a set-up change "tipped it over the edge".