Changed some function is AddonLoader and fixed some bugs.