Bugfix for issue #5