add checks for fields named id that aren't primary_keys and fix