fixing bug assignment error