fix error when remove a none-string element in array

Fix a bug when add or remove a none-string element to an array