fix for issue 677