Fix buffer overflow and use standard macro name