Fixed missing var declarations