Bugfix for issue #22.