Fixed error that would lead to an exception when receiving a string of length 0.