Fix document created bug.