fix view-detect bug.