errors management
some fixes