fix for issue #559