fix assigns leading to errors, improve test.