adds missing var statement