Bug fix- missing var