buggfix and style changes