Finish the process of removing $query from thumb links. (Forgot to remove $query from the thumb links)