Changed the classes where the queries had syntax errors