checked wrong variable name against allocation error