Improved XS module handling