Handling errors

Some fixes for error handlers
Fix for check/uncheck

Fix for check/uncheck tree items