Added a couple of failsafe for views throwing errors.