Well, you DID lose the factor of a 1/3 in your frequency-0 term. You multiplied p^2/3 by 3 and integrated it w.r.t. t and somehow ended up with 3p^2*t, in other words you multiplied it by 9 when you should have only multiplied it by 3. It should only be p^2*t.