Fix bug in addHTML & element selector on the client side