fixes bug for where debug() is set