Fixing the named query