fix printf and malloc