fixed empty string condition