Bugfix. closes #239