fixed unit bug