fix empty string handling