Strange behavior in AS3 lite remoting framework

I have made a mod for the popular AS3 remoting framework that handles the results then make a dataprovider if it’s a recordset. Due to a strange dispatchEvent it has bugs.

To follow along download my mod version of the framework here.
http://gfxcomplex.com/blog/amfphp/as3-lightweight-remoting-framework-datatype-mod-beta-01/
Place the frame work in your core code directory. You can use my amfphp that I have up for this test to follow a long.

here the document code.
[AS]
import com.dannypatterson.remoting.*;
import fl.data.DataProvider;

var serviceProxy:ServiceProxy;

serviceProxy = new ServiceProxy(“http://www.gfxcomplex.com/amfphp/gateway.php”, “test_service”, true, “AMF0”);
serviceProxy.addEventListener(ResultEvent.RESULT, onRec, false, 0, true);
serviceProxy.getRecordset();

function onRec(e:ResultEvent):void {
trace(e);
}
[/AS]

Place a break on line 56 of ResultEvent and debug.

bug:
[INDENT]you will see how the event is triggered the first time with the result datatype of an object. but for some reason the class Operation make a “dispatchEvent(new ResultEvent” on line 66 re-dispatching the same event again for a second time. This time around the same results come back as an Array datatype which breaks the logic.
[/INDENT]
I don’t understand the role Operation and OperationPool. Any ideas why it’s redispatching the same event over with different datatypes for the same results?