Type fix in xbmain.cpp