More fixes for upstream