Fixed exports undefined bug for exports and define