reset query when changing topic