Fixed browser compatibility issue in tests