Fix bugs in safari desktop