Fix typo

Fix some typo and coding style issues.