Fixing infinite refresh on Safari

Closes #13