modified google error handle (still needs to be fixed)