use array_replace instead of array_merge for merging options