Fixed snprintf