fixed bug in shared memory variable size