fixed random document fix