Fix segfault due to freeing of awlenv