fix lda and dmr states