Fix windows version of Treal to handle errors properly.