Fixed IndexError
Fixed variable name