fixed a segfault in the element initialization routine when a fatal error is thrown