fix crash

closes #14