Fixed memory init bug.