Fixed a bug where the empty string detection was not specific enough.