Remove odd optional assignment code and fix the test