Fixed a misuse of the memset function and typos.