fixed bug with assignment