fixed iterator in order to support empty strings