bugfix for issue #6