va_list bugfixes and warning prevention