Fix #7 - rare crash bug.