fix printf bug for init