fixed misbehaving debug