bug #4: fixed assignment optimization