Fixed misc bugs and misspellings