Prepare for development on 1.22.2
Fix SQL queries