REF: fixed debug mode