Fixing typo, waiting for document to be loaded