fixed multiple units bug