Bugfix and doc fix