Make sure there is a match before perform anything