Fixed compile errors caused by DEBUG macro.