fixed typo and missed parameter