fixed undefined use of snprintf