changed async to false now it works with safari