Fixed missing var declaration