Fix to debug scripts