fixing debug script