trying to delete undef instead of string