fixes for upstream changes