fix type set of R trick