fixed export queries