fixed compile issues and typos