Fixed undefined / empty string bugs.