Bugfix and typo fix