On the Davenport–Heilbronn theorems and second order terms