Bugfix for issue #37