fixed bugs for safari