Fixed bugs in attack system.