Fix segfault on alias, and export