Fixed #159

Fixed #159 (toLowerCase problem) using the following reference: http://my.opera.com/GreyWyvern/blog/show.dml/1671288.