Fix build issues and typos