Changed pref_sub from insert to upsert. Should allow us to update and create new with the same command