Fixed DEBUG bug