Fixed an error where the wrong variable was accessed in the conditional.