Added check to make sure arrays are not merged, but overwritten instead.