fixed bug: wrong assignment