fixed variable assignment typo
added reset controller