fix safari transition issue