Fix for issue #590