Fix error in selectQueryCallback method