fixed bugs in build_addon script