changing typo which threw a variable into undefined territory and threw errors