Debug state fixes