bugfix and fixed formatting