fix snprintf statement