fixed errors and typos in committed patches for #883.
updated style