       if parameter.value?
         if length <= @maximumLength
           buffer.writeUInt16LE(length)
-          buffer.writeString(parameter.value, 'ucs2')
+          buffer.writeString(parameter.value.toString(), 'ucs2')
         else
           # Length of all chunks.
           buffer.writeUInt64LE(length)
           # One chunk.
           buffer.writeUInt32LE(length)
-          buffer.writeString(parameter.value, 'ucs2')
+          buffer.writeString(parameter.value.toString(), 'ucs2')
           # PLP_TERMINATOR (no more chunks).
           buffer.writeUInt32LE(0)
       else

      if parameter.value?
        if length <= @maximumLength
          buffer.writeUInt16LE(length)
          buffer.writeString(parameter.value, 'ascii')
        else
          # Length of all chunks.
          buffer.writeUInt64LE(length)
          # One chunk.
          buffer.writeUInt32LE(length)
          buffer.writeString(parameter.value, 'ascii')
          # PLP_TERMINATOR (no more chunks).
          buffer.writeUInt32LE(0)
      else

      # ParamLenData
      if parameter.value?
        buffer.writeUInt8(1)
        buffer.writeInt8(parseInt(parameter.value))
      else
        buffer.writeUInt8(0)
  0x32:
