Fixed implicitly defined variable which was firing errors on IE 9,10,11

This was causing issues on some IE versions, or at least the ones I was testing my app on: 9, 10, 11 .
Hope it helps.