fixing empty string regression

h/t @nathanathan