fixed typo and initialization issue