fixes undefined checks for export