     private static function encodePacket(xml:XML, obj:Object, headers:Array = null, context:AMFXContext = null):void
     {
         if (headers)
-        {
             encodeHeaders(xml, headers, context);
-        }
-
         encodeBody(xml, obj, context);
     }
 

    private static function encodeBoolean(xml:XML, bool:Boolean):void
    {
        if (bool)
        {
            xml.appendChild(X_TRUE.copy());
        }
        else
        {
            xml.appendChild(X_FALSE.copy());
        }
    }



        }
        else
        {
            rememberObject(context, array);

            element = <array />;

