Made test code play nicely with actual browsers