fixed match saving: now checks for multiple records
fixed merge conflicts