fixed checktype