computeType() fixed