improved Primitive handling