Fix issues with destroying pages