Fix HQL error