fix v4 to v5 patch