fix #135

added a check when creating a view with an undefined element,
we now log an error.

close #135