adds missing var declaration