Fixes for latest xgen