Heat capacity and pairing transition in nuclei