bugfix for issue #7