fix bugs in combat with mouse