Fixed pass by reference bug in Document entry