fix bug that doesn't check for all states b2d vm can be in.  closes #162, also closes #135