fixed a few mistyped variables