add fix for safari endless loop