fix error with empty strings