Fix buffer overflow
Enable debug