fix patch from upstream