Fix two array related defects (MAGN-619, MAGN-337)
Merge pull request #115 from ke-yu/StableBranchWithTestcases

Fix two array related defects (MAGN-619, MAGN-337)