Different approach to checking if page exists, fix some crashes