correcting debug calls