fix vprintf twice bug