Attempted fix for missing var