ammending some debug function checks