fixing bug in shared mem limits. working on shared mem arrays