applied patches to bat and makefile