fix debug flag reading