fixed the bug on safari