Fixed query for books query