increse resphdr size and fix memory leakage while completed