fix for issue #306