Fixed incorrectly named var  bug.