Fixing null pointer issue in arrays.