Fix error in debug function check