Fixing typo that caused the wrong variable to be used.
Its late and time for bed...