Fixed duplicate reference of heap locatons, and stopped CWD from being freed if it...

UCC git Repository :: git.ucc.asn.au