Makes checking whether assignment is done more robust
Fixes assignments