fix sort for safari