Bugfix and other minor changes.