fixed some typos and corrected the indentation
related to issue #345