Fix for #364

- Fix  #364
- Some reindenting to avoid long lines.