Changed some logic in unit.action()