fixes #2166. Changes made to fix .bat.