fix a safari compatibility issue of