fixed the query condition for star