Fix issue with domready in safari