Fix current version
Fix current versions
Do embedded matching within SQL query instead of in code