fix ancient scope problems and port over eight with mods