Updated queries due to changes in database schema (id conflicts)