updated regex for page change, added timeout