Fixed missing var and coding style.