Code review and fixes for match_details in select