fix misspelling and minor bugs