fix sample + fix custom element to not replace on and emit methods