BUG: add another edge state sampling test and fix a bug that it discovered