Fix wrongly referenced variable