bugfixes to attack