Fix issue with export function