Fixes to E4X support