Fixed flawed logic in word construction.