bugfix and style changes