Small bugfixes that fix some reftests.