fixed the PATH bug and some memory leaks, still some supressed errors to check