added waitAfterLastRequest to make sure pages render correctly