Fix for issue 376