Fixed typo.
Removed unused variable and fixed xml param reference.