Fixed debug script