fixed bug in field creation, add apiVersion constant ref