fix size of local arrays and heap