Fix handling of not found pages