fixed js on safari