resize buffer

re allocate fixed, it works now properly