Fixed orphaned pages issue