Fixed off-by-one error in UI comm thread