better fix for undefined DEBUG issue