Bugfix for issue #57