fix safari rendering bug