See that the avere here above is missing its final e? It happens very often, both with essere and avere, when they are used to form the infinito passato, although both avere and aver are correct in this context.
Also, note that the past participles follow the same agreement rules as the other : the ones following avere always end in -o, while the ones following essere agree in gender and number with the subject.