error handling and some improvements of lazy attribute events loading