errors correction on lib and locallib