Changed the debugging helping functions