fix xoi crashes