improvment and bug fixing in addon loading