fixing error detecting that google has loaded