bugfix and added copyright