Fixes for upstream API breakage