improve duplicate code injection protection, fix bubblesjs error