bugfix for issue #310