fixed typos and missing assignments