Fix build errors when upgrading to gms 6.5