A buffer was allocated for strlen(event) characters leading to the name always being truncated by one character. The use of a buffer was unnecessary and was fixed by using the mon_get_event_name function directly.