Improve exception messages
Fix bug with choose of widget type