Merged and fixed some weird assignment

it worked but i don t like it