Bugfix and style changes