fixed 500 errors for type page