Fixed wordAndOccurence method.