Wasnt passing the query object