Fixed bugs in damage system