Workaround for Safari bug

Close #313