Fixed wordcount script