Some error handling tweaks and Viewengine adjustment