Release temporary buffer immediately
Fix warnings