fixed the documet ready issue