fixes problem on element event handler assignamente