Issue 1531 - fix issue with slow batch files.