Changed variable to make sure it is from custom query