fix bug on safar