fix multiple document loading