fixed a race condition in the export function... now it waits for the data to be ready beforing allowing downloading