       aPath = ""
     else
       aPath = PATH_SEP
-    aPath + aSeperator + key
+    aPath + aSeperator + aKey
 
   #return [path, key, separator, realSeparator]
   #the realSeparator is optional, only (aSeparator && aSeparator !== seperator

  @decodeKey: decodeKey = (key, keyEncoding, options)->
    #v=[parent, key, separator, realSeparator]
    #realSeparator is optional only opts.separator && opts.separator != realSeparator
    v = decode(key, options && options.separator)
    vSep = v[2] #separator
    vSep = PATH_SEP unless vSep?  #if the precodec is other codec.
    key = if keyEncoding then keyEncoding.decode(v[1], options) else v[1]

        aSeperator = PATH_SEP + aSeperator
    else if keyIsStr
      #try to find the separator on the key
      i = SUBKEY_SEPS[0].indexOf(aKey[0], 1)
      if i > 0
          vSeperator = PATH_SEP + SUBKEY_SEPS[1][i]
          aKey = aKey.substring(1)
    #console.log("codec.encode:",path.join(e[0]) + vSeperator + key)
    #TODO: I should encode with path.join(e[0], vSeperator + key)) simply in V8.
    #      all separators are same now.
