fixed bug of bad assignments