Fixed a wrong type issue in initial XS creation