fix bug for debugOpen