fix the format string in snprintf