Fix tjis in  CheckSamePage function