Bugfix for issue #31