fix DEBUG mode