more fixes for upstream changes