Removed misplaced NIL.
Replaced incorrect variable by the correct one.