fixed issues with duplicate pages