bat: fix issue #17