Precondition check fix of XA implementation

Some trivial fixes