fixed bug on create document