fix debug toggle