Fix for issue #477