fixed bug in loadDocData