fix bug on safari