Fixed word counting bug