Fix warnings in DEBUG mode