Fix tests for upstream changes