Added checks for existince of Boxes, Aus, and Plns used in queries.