Corrected bug which produced warnings about elements mismatch and
offset. Due to constructing array out of theme elements.

Corrected bug which results from empty database table attempting to
return results.

Signed-off-by: Rion Parsons <rkparson@ucsc.edu>