Corrected the query