Bugfix for issue #58