put va_end() in the right place