Fixed bug for Safari

Finally.