fix damage calculation