fix bug with empty strings