Wrong var name being used