Bug fix for duplicate pages