fixes pointers in pyview
fix in error handling