Fix silent exceptions on elements

Related to #836