fixed #337

improved auto indentation for some cases
Merge pull request #344 from deadok22/337

fixed #337