fixed a bug in BlockString memory allocation