Bugfix for issue #2