Index: trunk/pswarp/src/pswarpLoadAstrometry.c
===================================================================
--- trunk/pswarp/src/pswarpLoadAstrometry.c	(revision 35616)
+++ trunk/pswarp/src/pswarpLoadAstrometry.c	(revision 39981)
@@ -96,4 +96,14 @@
     // apply the bilevel astrometry elements to the target
     if (bilevelAstrometry) {
+      int additional_orders = 4;
+      bool status = false;
+      int config_additional_orders = psMetadataLookupS32(&status,config->arguments,"ADDITIONAL_WCS_ORDERS");
+      if (status) {
+	additional_orders = config_additional_orders;
+      }
+      psMetadataAddS32(astrom->fpa->analysis,PS_LIST_TAIL, "ADDITIONAL_WCS_ORDERS", PS_META_REPLACE,
+		       "Additional orders for bilevel fit.", additional_orders);
+      
+	
 	if (!pmAstromReadBilevelMosaic(astrom->fpa, phu->header)) {
 	    psError(psErrorCodeLast(), false, "Unable to read bilevel mosaic astrometry for skycell.");
