alloc and symbol ref fixes