Pedrosa happy after tough qualifying