fix'ed export functionality