Corrected bug in old versions of IE where strings doesn't have the toString method.