fix a lazy crashing bug (c.f. Issue #757)