fix debug messaging on changing context