fixing variable allocation per node