fix for issue #588