SecureString problem

Hello, i'm working on a secure passwordfield verion for unity. My problem is, if i remove a char form the securestring, the object goes invalid. Is this a mono bug? sry about my english XD

example:

add: Hello 72 101 108 108 111

remove last: He 72 101 0 0

using System;
using System.Security;
using UnityEngine;
using System.Runtime.InteropServices;

public class SecurePasswordField : MonoBehaviour
{
    SecureString sPW = new SecureString();
    string pw = string.Empty;
    void OnGUI()
    {
        pw = GUI.TextField(new Rect(0, 0, 200, 30), pw);
        if (GUI.Button(new Rect(0, 32, 200, 30), "save"))
        {
            foreach (char key in pw)
            {
                sPW.AppendChar(key);
            }
            pw = string.Empty;
        }
        if (GUI.Button(new Rect(0, 64, 200, 30), "< delete last"))
        {
            sPW.RemoveAt(sPW.Length - 1);
        }
        if (GUI.Button(new Rect(0, 96, 200, 30), "show"))
        {
            IntPtr pointer = Marshal.SecureStringToBSTR(sPW);
            string txt = Marshal.PtrToStringBSTR(pointer);
            Debug.Log(txt);
            string txt1 = string.Empty;
            foreach (char key in txt)
            {
                txt1 += ((byte)key) + " ";
            }
            Debug.Log(txt1);
            Marshal.ZeroFreeBSTR(pointer);
        }
    }
}

I am seeing this too. I just filed a bug

EDIT: I have submitted a patch to mono to fix this. However, I would like to point out that the mono implementation of SecureString does not actually encrypt your data. That is on the TODO list. So, if you really want secure in-memory storage, you will have to do some more research.