End of bug correction, propagated to export functions