fixed troops addition and upgrade bug