make sure it woks with subpages