Fix custom_match when looking for a specific device