Fix crash for case when no page exists
Cleanup