Change tf hash initialization in Document