             }
         }
         
-        if arr[i + 1] == "/" {
+        if messageCharacters[i + 1] == "/" {
             nsp = ""
             
-            while ++i < arr.count {
-                let c = arr[i]
+            while ++i < messageCharacters.count {
+                let c = messageCharacters[i]
                 
                 if c == "," {
                     break

        if type == .BinaryEvent || type == .BinaryAck {
            var buf = ""
            
            while arr[++i] != "-" {
                buf += String(arr[i])
                if i == arr.count {
                    break
                }
            }
            
            if let holders = Int(buf) where arr[i] == "-" {
                placeholders = holders
            } else {
                NSLog("Error parsing \(str)")

            }
        }
        
        if i + 1 >= messageCharacters.count {
            return SocketPacket(type: type, id: id ?? -1,
                nsp: nsp ?? "/", placeholders: placeholders)
        }
        
        let next = String(messageCharacters[i + 1])
        
        if Int(next) != nil {
            var c = ""
            while ++i < messageCharacters.count {
                if let int = Int(String(messageCharacters[i])) {
                    c += String(int)
                } else {
                    --i
