         }
 
         private function onCallCalled(command: String, ... args):void {
-            this._nc.call(command, null, args);
+            try {
+                log('info', 'Calling '+command);
+                var __incomingArgs:* = args as Array;
+                var __newArgs:Array = [command, null].concat(__incomingArgs);
+                var __sanitizedArgs:Array = cleanObject(__newArgs);
+                this._nc.call.apply(this._nc, __sanitizedArgs);
+            } catch (e: Error) {
+                log('error', e.message);
+            }
         }
 
         private function onCloseCalled():void {

            }
        }

        private function log(level: String, message: String):void {
            if (loaderInfo.parameters.debug != undefined && loaderInfo.parameters.debug == "true") {
                this.callExternalInterface(_jsLogProxyName, level, message);
            }
        }


        }

        private function onConnectCalled(command:*, ...args):void {
            log('info', 'Connecting to '+command);
            var __incomingArgs:* = args as Array;
            var __newArgs:Array = [command].concat(__incomingArgs);
            var __sanitizedArgs:Array = cleanObject(__newArgs);
            this._nc.connect.apply(this._nc, __sanitizedArgs);
        }

        private function onSetClientCalled(methods: Array):void {
