#51 - check for empty match and add FK constraint