Added missing semi coolons
Fixed undefined variable