fix configs load, add support to bat and ocelot, fix some bugs