Buffer leak fix
Small fix
Fix missing buffer allocation
Stack size adjustments