added performance improvements for safari