Bugfixes and indentation correction.