Fix for Broken Pipe exception.