fix error when remove a none-string element in array