fix for issue #804