Reimplemented fixed for exceptions when attaching to Unity process.