fix hql errors