New values not getting added to array