Workaround very strange Safari bug [fixes #262]