Fix crashes with mesecons (reported and fixed by polletfa)