Fix handling of empty string