fixed debug script