fixbug for using @snprintf