batle and fixed bugs