Bugfix and add license