Fixed wrongly referenced variable