fixed occasional errors of difference engine