Fix compile errors on extension