[Wen Hao] - fixed strange errors working on windows but not linux.