Fix for issue 677.