Critical Fixes

Fixes required for latest XE compatibility