fixed bug in linear assignment