Sometimes open() did not seem to wait for page to be fully loaded. Hope this fixes that.