Minimal changes to get IMA plugin working