Changes needed for being V5 code compatible.