Fix to link reallocation bugs (lines 96, 104, maybe 106?)