Fix character attack and some warnings