Fixed some bugs in Word Stats problem