Try moving AGM init to function so I can run it as preinit...