fix printf bug